<div class="bjui-pageHeader" style="background-color: #fefefe; border-bottom: none;">
    <form action="/admin/administration/conference-room-list" data-toggle="ajaxsearch" id="findglobalform" data-options="{
    validate:false,
    searchDatagrid:$.CurrentNavtab.find('#conference-room-list'),

    }">
        <fieldset>
            <legend style="font-weight:normal;">搜索：</legend>
            <div style="margin:0; padding:1px 5px 5px;">
                <span>会议室名称:</span>
                <input name="name" size="10">&nbsp;

                <span>会议室面积:</span>
                <input name="area" size="10">&nbsp;
                <span>会议室位置:</span>
                <input name="position" size="10">&nbsp;
                <span>是否预约:</span>
                <select name="status" data-toggle="selectpicker">
                    <option value="">全部</option>
                    <option value="1">已预约</option>
                    <option value="0">未预约</option>
                </select>


                <div class="btn-group">
                    <button type="submit" class="btn-green" data-icon="search">查询！</button>

                </div>
            </div>
        </fieldset>
    </form>
</div>
<div class="bjui-pageContent">
    <table class="table table-bordered" id="conference-room-list" data-toggle="datagrid" data-options="{
    height: '100%',

    showToolbar: true,
    fullGrid:true,
    filterThead:false,
    columnMenu:false,
    local: 'remote',
    dataUrl:'/admin/administration/conference-room-list',
    editUrl:'/admin/administration/conference-room-list',
    toolbarCustom: toolbar,
    linenumberAll: true
}">
        <thead>
        <th data-options="{name:'name',align:'center',width:70}">会议室名称</th>

        <th data-options="{name:'area',align:'center',width:70,render: function(value) {
                    return value ? value.substr(0, 18) : value
                }}">会议室面积
        </th>
        <th data-options="{name:'position',align:'center',width:70,render: function(value) {
                    return value ? value.substr(0, 18) : value
                }}">会议室位置
        </th>
        <th data-options="{name:'status',align:'center',width:70}">是否预约
        </th>
        <th data-options="{align:'center',render:operationColumn}">操作</th>
        </thead>
    </table>
</div>
<script>
    function operationColumn(value, data) {

        var html = '<button type="button" class="btn btn-green" data-toggle="navtab" data-options="{id:\'conference-room-edit\', url:\'/admin/administration/conference-room-edit\', mask:true, width:900, height:400, title:\'编辑会议室\', data:{id:' + data.id + '}}"><i class="fa fa-edit"></i>编辑</button>';


            html += '<button type="button" class="btn btn-green" data-toggle="navtab" data-options="{id:\'conference-room-record-list\', url:\'/admin/administration/conference-room-record-list\', mask:true, width:900, height:400, title:\'会议室预约记录\', data:{id:' + data.id + '}}"><i class="fa fa-edit"></i>预约记录</button>';

//        html += '<button type="button" class="btn btn-red bjui-datagrid-btn delete"  data-toggle="del.datagrid.tr" ><i class="fa fa-remove"></i>删除</button>';
        return html;
    }
    function toolbar() {
        var html = '<button type="button" class="btn btn-blue"  data-toggle="navtab" data-options="{id:\'conference-room-add\', url:\'/admin/administration/conference-room-add\', title:\'录入会议室\',width:900,height:400,data:{addFlag:1}, mask:true}"><i class="fa fa-plus"></i> 录入会议室</button>';
        return html;
    }


</script>